﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="frm_MyBackBillEdit.aspx.cs" Inherits="SaleSystem.Business.frm_MyBackBillEdit" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <ext:PageManager runat="server" ID="PageManager1" />
        <toolbars>
                <ext:Toolbar ID="Toolbar1" runat="server">
                    <Items>
                        <ext:Button runat="server" ID="bnSave" Icon="SystemSave" Text="保存" ValidateForms="SimpleForm1" OnClick="bnSave_Click">
                        </ext:Button>
                        <ext:Button runat="server" ID="bnOutput" Icon="PackageGo" Text="出库" ValidateForms="SimpleForm1" OnClick="bnOutput_Click" ConfirmTitle="出库确认！" ConfirmText="出库后，此返货单则不能修改，确认出库？">
                        </ext:Button>
                        <ext:Button runat="server" ID="bnInput" Text="结算" Icon="Coins" ConfirmIcon="Warning" OnClick="bn_Total_Click"></ext:Button>
                        <ext:Button runat="server" ID="bnClose" Icon="SystemClose" Text="关闭">
                        </ext:Button>                     
                    </Items>
                </ext:Toolbar>
            </toolbars>
        <ext:Form runat="server" ID="SimpleForm1" AutoHeight="true" AutoScroll="true" EnableBackgroundColor="true"
            ShowBorder="true" ShowHeader="false" BodyPadding="5px">
            <Rows>
                <ext:FormRow>
                    <Items>
                        <ext:TextBox runat="server" ID="tb_MBB_Code" Label="返货单号" Required="true" ShowRedStar="true" Width="200px" TabIndex="1">
                        </ext:TextBox> 
                        <ext:DropDownList runat="server" ID="ddl_MBB_Supp_Id"  Label="供应商" Width="200px" CompareValue="-1" CompareOperator="NotEqual" DataValueField="Supp_Id" DataTextField="Supp_Name" Required="true" ShowRedStar="true" TabIndex="2"></ext:DropDownList>                      
                    </Items>
                </ext:FormRow>         
                <ext:FormRow>
                    <Items>
                          <ext:DropDownList runat="server" ID="ddl_MBB_SUser_Id" Label="经办人" CompareValue="-1" CompareOperator="NotEqual" Width="200px" DataValueField="SUser_Id" Required="true" ShowRedStar="true" TabIndex="5"
                            DataTextField="SUser_Name">
                        </ext:DropDownList>
                        <ext:DatePicker runat="server" ID="dp_MBB_Date" Label="返货日期" Required="true" ShowRedStar="true"  Width="200px" TabIndex="6"></ext:DatePicker>
                    </Items>
                </ext:FormRow>
                                <ext:FormRow>
                    <Items>
                        <ext:Label runat="server" ID="lb_MBB_Output" Label="出库状态" Width="200px" EncodeText="false">
                        </ext:Label>
                        <ext:Label runat="server" ID="lb_MBB_State" Label="结算状态" Width="200px" EncodeText="false">
                        </ext:Label>
                    </Items>
                </ext:FormRow>
            </Rows>
        </ext:Form>
        <ext:Form runat="server" ID="Form2" AutoHeight="true" AutoScroll="true" EnableBackgroundColor="true" EnableCollapse="true"  
            ShowBorder="true" ShowHeader="true"  BodyPadding="5px" Title="更多信息"> 
            <Rows>
             <ext:FormRow >
                    <Items>
                          <ext:DropDownList runat="server" ID="ddl_MBB_PayType" Label="结算方式" Width="200px"    DataValueField="Id" DataTextField="Name" OnSelectedIndexChanged="ddl_SBill_PayTypeSelectedChanged" AutoPostBack="true" TabIndex="7"></ext:DropDownList>
                           <ext:DropDownList runat="server" ID="ddl_MBB_AList_Id" TabIndex="8" Label="结算帐户" Width="200px"    DataValueField="AList_Id" DataTextField="AccountInfo"></ext:DropDownList>
                    </Items>
                </ext:FormRow>
                        <ext:FormRow>
                    <Items> 
                        <ext:NumberBox runat="server" ID="nb_MBB_Money" Label="返货总额" Width="200px" Enabled="false"></ext:NumberBox>                        
                    </Items>
                </ext:FormRow> 
                <ext:FormRow>
                    <Items>
                        <ext:TextBox runat="server" ID="tb_MBB_Reason" MaxLength="200" Width="200px" Label="备注" TabIndex="11"></ext:TextBox>
                    </Items>
                </ext:FormRow>
                </Rows>
            </ext:Form>
        <ext:SimpleForm ID="SimpleForm2" ShowBorder="true" ShowHeader="false" runat="server"
            BodyPadding="5px" EnableBackgroundColor="true" Title="新增产品">
            <Toolbars>
                <ext:Toolbar ID="Toolbar2" runat="server">
                    <Items>
                        <ext:Label ID="lblTitle1" runat="server" Text="新增产品" CssStyle="font-weight:bold;">
                        </ext:Label>
                        <ext:ToolbarFill ID="ToolbarFill1" runat="server">
                        </ext:ToolbarFill>
                        <ext:Button ID="btnAdd" Text="添加" runat="server" Icon="Add" OnClick="btnAdd_Click"
                            ValidateForms="SimpleForm2">
                        </ext:Button>
                        <ext:Button ID="btnCancle" Text="取消" runat="server" Icon="Cancel" Hidden="true" OnClick="btnCancel_Click">
                        </ext:Button>
                    </Items>
                </ext:Toolbar>
            </Toolbars>
            <Items>
                <ext:ContentPanel ID="ContentPanel2" runat="server" EnableBackgroundColor="true"
                    ShowBorder="false" ShowHeader="false">
                        <table width="100%" border=0>
                            <tr> 
                                <td width="300">产品名称</td>
                                <td width="60">数量</td>
                                <td width="60">单价</td>
                                <td width="60" style="display:none">金额</td> 
                            </tr>
                            <tr> <td> <ext:TriggerBox Width="300px" EnableEdit="false" runat="server" ID="tb_SBDeta_PInfo_Id" TriggerIcon="Search" EnablePostBack="false" Required="true" TabIndex="12"></ext:TriggerBox>
                                    


                                    <ext:HiddenField ID="hf_SBDeta_PInfo_Id" runat="server">
                                    </ext:HiddenField>

</td>
                                <td><ext:NumberBox runat="server" ID="nb_SBDeta_Count" Required="true" DecimalPrecision="0" TabIndex="13"></ext:NumberBox>

</td>
                                <td style="display:none"><ext:NumberBox runat="server" ID="nb_SBDeta_Money" Required="true" Enabled="false" DecimalPrecision="0" TabIndex="14"></ext:NumberBox>

</td> 
                                <td><ext:NumberBox runat="server" ID="nb_SBDeta_Price" Required="true"  DecimalPrecision="0" TabIndex="15"></ext:NumberBox>

</td>  
                            </tr>
                        </table>
                </ext:ContentPanel>
            </Items>
        </ext:SimpleForm>
        <ext:Grid runat="server" ID="gv_List" EnableBackgroundColor="true" Title="返货单明细"
            DataKeyNames="MBBDeta_Id,MBBDeta_PInfo_Id,PInfo_Code" EnableRowNumber="true" AllowPaging="true"
            AutoHeight="true" OnRowCommand="gv_List_RowCommand" PageSize="10" OnPageIndexChange="gv_List_PageIndexChange">
            <Columns>
                <ext:BoundField ColumnID="PInfo_Code" DataField="PInfo_Code" DataTooltipField="PInfo_Code"
                    HeaderText="产品编码" Width="100px" />
                <ext:BoundField ColumnID="PInfo_Name" DataField="PInfo_Name" DataTooltipField="PInfo_Name"
                    HeaderText="产品名称" Width="100px" />
                <ext:BoundField ColumnID="PSort_Name" DataField="PSort_Name" DataTooltipField="PSort_Name"
                    HeaderText="产品类型" Width="100px" />
                <ext:BoundField ColumnID="MBBDeta_Count" DataField="MBBDeta_Count" DataTooltipField="MBBDeta_Count"
                    HeaderText="数量" Width="50px" />
                <ext:BoundField ColumnID="MBBDeta_Price" DataField="MBBDeta_Price" DataTooltipField="MBBDeta_Price"
                    HeaderText="单价" Width="60px" />
                <ext:BoundField ColumnID="MBBDeta_Money" DataField="MBBDeta_Money" DataTooltipField="MBBDeta_Money"
                    HeaderText="金额" Width="60px" /> 
                <ext:LinkButtonField ColumnID="eidt" CommandName="edit" Text="编辑" HeaderText="编辑"
                    Width="60px" />
                <ext:LinkButtonField ColumnID="delete" CommandName="Delete" ConfirmIcon="Question"
                    ConfirmText="确认删除此信息？" Text="删除" HeaderText="删除" Width="60px" />
            </Columns>
        </ext:Grid>
        <ext:Window runat="server" ID="win_Content" Popup="false" EnableIFrame="true" EnableConfirmOnClose="true"
            Title="选择客户" IFrameUrl="about:blank" Target="Top" IsModal="true" Width="730px"
            Height="550px" EnableMaximize="true">
        </ext:Window>
    </div>
      <ext:HiddenField ID="hf_SBDeta_Price" runat="server"></ext:HiddenField>
      <ext:HiddenField ID="hf_SBill_Cust_Id" runat="server"></ext:HiddenField>
    <ext:Window runat="server" ID="win_Content2" Popup="false" EnableIFrame="true"  EnableConfirmOnClose="true" Title="选择产品" IFrameUrl="about:blank" Target="Top" IsModal="true" Width="730px" Height="550px" EnableMaximize="true"></ext:Window>
                                                       <ext:Window runat="server" ID="win_Confirm" IsModal="true" EnableDrag="true"  EnableClose="true" Height="250px" Width="400px" Hidden="true"  Layout="Absolute" IFrameUrl="" EnableIFrame="true"  >
               </ext:Window>
    </form>
</body>
</html>
